﻿<%@ Page Title="" Language="C#" MasterPageFile="/Common/Master.master" %>

<script runat="server">

</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentForm" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentHtml" runat="Server">
    <div id="toolBar" style="display: none;">
        <div id="toolbarAdd" data-options="iconCls:'icon-table_add',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Insert(obj)">添加</div>
        <div id="toolbarEdit" data-options="iconCls:'icon-table_edit',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Update(obj)">修改</div>
        <div id="toolbarDelete" style="display: none;" data-options="iconCls:'icon-table_delete',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Delete(obj)">删除</div>
        <div data-options="iconCls:'icon-table_gear',plain:'true'" class="easyui-linkbutton" onclick="qxgl();">权限管理</div>
        <div id="toolbarSearchtext"></div>
    </div>
    <div id="page"></div>
    <table id="dg1" style="display: none;">
        <thead>
            <tr>
                <th data-options="field: 'id',width: 75">编号</th>
                <th data-options="field: 'name',width: 150">名称</th>
                <th data-options="field: 'addtime',width: 150,formatter:function(val,rec){ return $.DateFormat(val, 'yyyy-MM-dd HH:mm:ss'); }">创建时间</th>
                <th data-options="field: 'adduserid',width: 150">创建人ID</th>
            </tr>
        </thead>
    </table>

    <script type="text/javascript">
        var obj;
        $(function () {
            obj = {
                id: "dg1",
                key: "id",
                url: "system_role/GetListByPage",
                deleteUrl: "system_role/DeleteById",
                data: {},

                //title: "角色管理",
                dialogName: "角色管理",
                dialogWidth: "450px",
                dialogHeight: "250px",
                editUrl: "/system/Jurisdiction/edit.aspx",
                detailsUrl: "/system/Jurisdiction/details.aspx",
                toolBar: '#toolBar',
                footer: '#page',
                callback: function () { $.fn.DataGrid.onRefresh(obj); }
            };
            $.fn.DataGrid.DataBind(obj);
        });
        function qxgl() {
            var row = $('#dg1').datagrid('getSelected');
            if (row != null) {
                var _url = "/system/Jurisdiction/qx.aspx?JurisdictionID=" + row[obj.key];
                $.layerOpen({
                    title: "权限管理",
                    url: _url
                });
            } else {
                $.messager.alert('修改操作', '您还没有选择任何记录！', 'info');
            }
        }
    </script>
</asp:Content>

